/*
 * @Description:
 * @Author: Allen
 * @Date: 2021-04-03 15:39:42
 * @LastEditors: Allen
 * @LastEditTime: 2021-04-03 16:09:27
 */
import axios from '@/utils/request.js'
export default {
    namespaced: true,
    state: {
        categoryDate: []
    },
    getters: {},
    mutations: {
        changeCategoryData(state, payload) {
            state.categoryDate = payload;
        }
    },
    actions: {
        async findAllCategory({ commit }) {
            let res = await axios.get('/category/findAll');
            commit('changeCategoryData', res.data);
        }
    }
}
